package com.sks.service.privilege;

import java.util.List;

import com.sks.bean.privilege.SystemPrivilege;
import com.sks.bean.privilege.SystemPrivilegePK;
import com.sks.dao.base.DAO;

public interface SystemPrivilegeService extends DAO<SystemPrivilege> {
	/**
	 * 批量保存系统权限
	 * @param privileges
	 */
	public void batchSave(List<SystemPrivilege> privileges);
	
	public List<SystemPrivilege> getPrivilegeByModule(String... modules);
	
	public boolean hasPrivilege(String username, SystemPrivilegePK pid);
	
	public boolean hasPrivilege(String username, String module, String privilege);
	
	public List<SystemPrivilege> getPrivileges(String username, SystemPrivilegePK pk);

	public List<SystemPrivilege> getPrivileges(String username);
}
